/*
 Navicat Premium Data Transfer

 Source Server         : tpadmin.oh520.cn
 Source Server Type    : MySQL
 Source Server Version : 50650
 Source Host           : tpadmin.oh520.cn:3306
 Source Schema         : tpadmin_oh520

 Target Server Type    : MySQL
 Target Server Version : 50650
 File Encoding         : 65001

 Date: 31/10/2021 12:22:12
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_perm
-- ----------------------------
DROP TABLE IF EXISTS `sys_perm`;
CREATE TABLE `sys_perm` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `delete_time` datetime DEFAULT NULL COMMENT '软删除时间',
  `pid` int(11) NOT NULL DEFAULT '0' COMMENT '父节点id',
  `name` varchar(255) DEFAULT NULL COMMENT '名字',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注信息',
  `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序号,默认0',
  `perm` varchar(255) DEFAULT NULL COMMENT '权限节点',
  `status` int(1) NOT NULL DEFAULT '1' COMMENT '是否启用? 0=未启用; 1=启用<默认>',
  `icon` varchar(255) DEFAULT NULL COMMENT '图标',
  `type` int(1) NOT NULL DEFAULT '0' COMMENT '类型;1=目录,2=菜单;3=按钮',
  `path` varchar(255) DEFAULT NULL COMMENT '路径;前端页面的完整路径',
  `target` varchar(255) DEFAULT NULL COMMENT '目标;同前端a标签的target属性',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

-- ----------------------------
-- Records of sys_perm
-- ----------------------------
BEGIN;
INSERT INTO `sys_perm` VALUES (1, '2021-10-28 10:03:22', '2021-10-28 10:03:22', NULL, 0, '仪表盘', '', 0, NULL, 1, 'fa fa-pie-chart', 1, '', '_self');
INSERT INTO `sys_perm` VALUES (2, '2021-10-28 10:31:19', '2021-10-28 10:31:19', NULL, 1, '统计风格', '', 0, NULL, 1, 'fa fa-line-chart', 2, '/console/dashboard_chart', '_self');
INSERT INTO `sys_perm` VALUES (3, '2021-10-28 10:31:50', '2021-10-28 10:31:50', NULL, 1, '主页风格', '', 0, NULL, 1, 'fa fa-tachometer', 2, '/console/dashboard_home', '_self');
INSERT INTO `sys_perm` VALUES (4, '2021-10-28 10:32:14', '2021-10-28 10:32:14', NULL, 0, '系统配置', '', 0, NULL, 1, 'fa fa-gears', 1, '', '_self');
INSERT INTO `sys_perm` VALUES (5, '2021-10-28 10:34:58', '2021-10-28 10:35:18', NULL, 4, '账号管理', '', 0, 'admin_management', 1, 'fa fa-users', 2, '/console/admin_management', '_self');
INSERT INTO `sys_perm` VALUES (6, '2021-10-28 10:35:45', '2021-10-28 10:35:45', NULL, 5, '获取列表', '', 0, 'admin_management.list', 1, '', 3, '', '_self');
INSERT INTO `sys_perm` VALUES (7, '2021-10-28 10:36:08', '2021-10-28 10:36:08', NULL, 5, '新增数据', '', 0, 'admin_management.create', 1, '', 3, '', '_self');
INSERT INTO `sys_perm` VALUES (8, '2021-10-28 10:36:30', '2021-10-28 10:36:51', NULL, 5, '删除数据', '', 0, 'admin_management.remove', 1, '', 3, '', '_self');
INSERT INTO `sys_perm` VALUES (9, '2021-10-28 10:36:47', '2021-10-28 10:36:47', NULL, 5, '更新数据', '', 0, 'admin_management.update', 1, '', 3, '', '_self');
INSERT INTO `sys_perm` VALUES (10, '2021-10-28 10:39:07', '2021-10-28 10:41:53', NULL, 4, '角色管理', '', 0, 'role_management', 1, 'fa fa-vcard', 2, '/console/role_management', '_self');
INSERT INTO `sys_perm` VALUES (11, '2021-10-28 10:39:27', '2021-10-28 10:41:57', NULL, 10, '获取列表', '', 0, 'role_management.list', 1, '', 3, '', '_self');
INSERT INTO `sys_perm` VALUES (12, '2021-10-28 10:39:42', '2021-10-28 10:42:00', NULL, 10, '新增数据', '', 0, 'role_management.create', 1, '', 3, '', '_self');
INSERT INTO `sys_perm` VALUES (13, '2021-10-28 10:39:56', '2021-10-28 10:42:04', NULL, 10, '删除数据', '', 0, 'role_management.remove', 1, '', 3, '', '_self');
INSERT INTO `sys_perm` VALUES (14, '2021-10-28 10:40:13', '2021-10-28 10:42:07', NULL, 10, '更新数据', '', 0, 'role_management.update', 1, '', 3, '', '_self');
INSERT INTO `sys_perm` VALUES (15, '2021-10-28 10:42:52', '2021-10-28 10:43:53', NULL, 4, '菜单管理', '', 0, 'perm_management', 1, 'fa fa-reorder', 2, '/console/perm_management', '_self');
INSERT INTO `sys_perm` VALUES (16, '2021-10-28 10:43:36', '2021-10-28 10:43:36', NULL, 15, '获取列表', '', 0, 'perm_management.list', 1, '', 3, '', '_self');
INSERT INTO `sys_perm` VALUES (17, '2021-10-28 10:44:25', '2021-10-28 10:44:25', NULL, 15, '新增数据', '', 0, 'perm_management.create', 1, '', 3, '', '_self');
INSERT INTO `sys_perm` VALUES (18, '2021-10-28 10:44:46', '2021-10-28 10:44:46', NULL, 15, '删除数据', '', 0, 'perm_management.remove', 1, '', 3, '', '_self');
INSERT INTO `sys_perm` VALUES (19, '2021-10-28 10:44:59', '2021-10-28 10:44:59', NULL, 15, '更新数据', '', 0, 'perm_management.update', 1, '', 3, '', '_self');
INSERT INTO `sys_perm` VALUES (20, '2021-10-31 12:18:52', '2021-10-31 12:18:58', NULL, 0, '后台首页', '', 999, '', 1, 'fa fa-home', 2, '/console/dashboard_chart', '_self');
COMMIT;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `delete_time` datetime DEFAULT NULL COMMENT '软删除时间',
  `name` varchar(255) DEFAULT NULL COMMENT '名字',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注信息',
  `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序号,默认0',
  `perm` varchar(255) DEFAULT NULL COMMENT '权限节点',
  `status` int(1) NOT NULL DEFAULT '1' COMMENT '是否启用? 0=未启用; 1=启用<默认>',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` VALUES (1, '2021-10-28 10:02:22', '2021-10-31 12:21:16', NULL, '体验账号', '演示系统专用角色，真实环境下除非有需求否则建议直接禁用！', 0, '20,1,2,3,4,5,6,10,11,15,16', 1);
INSERT INTO `sys_role` VALUES (2, '2021-10-28 10:02:34', '2021-10-31 12:21:19', NULL, '管理员账号', '拥有后台的所有权限', 0, '20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19', 1);
COMMIT;

-- ----------------------------
-- Table structure for sys_role_perm
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_perm`;
CREATE TABLE `sys_role_perm` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `delete_time` datetime DEFAULT NULL COMMENT '软删除时间',
  `role_id` int(11) DEFAULT NULL COMMENT '角色id',
  `perm_id` int(11) DEFAULT NULL COMMENT '菜单id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

-- ----------------------------
-- Records of sys_role_perm
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_perm` VALUES (1, '2021-10-31 12:21:16', '2021-10-31 12:21:16', NULL, 1, 20);
INSERT INTO `sys_role_perm` VALUES (2, '2021-10-31 12:21:16', '2021-10-31 12:21:16', NULL, 1, 1);
INSERT INTO `sys_role_perm` VALUES (3, '2021-10-31 12:21:16', '2021-10-31 12:21:16', NULL, 1, 2);
INSERT INTO `sys_role_perm` VALUES (4, '2021-10-31 12:21:16', '2021-10-31 12:21:16', NULL, 1, 3);
INSERT INTO `sys_role_perm` VALUES (5, '2021-10-31 12:21:16', '2021-10-31 12:21:16', NULL, 1, 4);
INSERT INTO `sys_role_perm` VALUES (6, '2021-10-31 12:21:16', '2021-10-31 12:21:16', NULL, 1, 5);
INSERT INTO `sys_role_perm` VALUES (7, '2021-10-31 12:21:16', '2021-10-31 12:21:16', NULL, 1, 6);
INSERT INTO `sys_role_perm` VALUES (8, '2021-10-31 12:21:16', '2021-10-31 12:21:16', NULL, 1, 10);
INSERT INTO `sys_role_perm` VALUES (9, '2021-10-31 12:21:16', '2021-10-31 12:21:16', NULL, 1, 11);
INSERT INTO `sys_role_perm` VALUES (10, '2021-10-31 12:21:16', '2021-10-31 12:21:16', NULL, 1, 15);
INSERT INTO `sys_role_perm` VALUES (11, '2021-10-31 12:21:16', '2021-10-31 12:21:16', NULL, 1, 16);
INSERT INTO `sys_role_perm` VALUES (12, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 20);
INSERT INTO `sys_role_perm` VALUES (13, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 1);
INSERT INTO `sys_role_perm` VALUES (14, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 2);
INSERT INTO `sys_role_perm` VALUES (15, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 3);
INSERT INTO `sys_role_perm` VALUES (16, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 4);
INSERT INTO `sys_role_perm` VALUES (17, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 5);
INSERT INTO `sys_role_perm` VALUES (18, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 6);
INSERT INTO `sys_role_perm` VALUES (19, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 7);
INSERT INTO `sys_role_perm` VALUES (20, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 8);
INSERT INTO `sys_role_perm` VALUES (21, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 9);
INSERT INTO `sys_role_perm` VALUES (22, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 10);
INSERT INTO `sys_role_perm` VALUES (23, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 11);
INSERT INTO `sys_role_perm` VALUES (24, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 12);
INSERT INTO `sys_role_perm` VALUES (25, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 13);
INSERT INTO `sys_role_perm` VALUES (26, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 14);
INSERT INTO `sys_role_perm` VALUES (27, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 15);
INSERT INTO `sys_role_perm` VALUES (28, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 16);
INSERT INTO `sys_role_perm` VALUES (29, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 17);
INSERT INTO `sys_role_perm` VALUES (30, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 18);
INSERT INTO `sys_role_perm` VALUES (31, '2021-10-31 12:21:19', '2021-10-31 12:21:19', NULL, 2, 19);
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `delete_time` datetime DEFAULT NULL COMMENT '软删除时间',
  `account` varchar(255) DEFAULT NULL COMMENT '账号',
  `avatar` varchar(255) DEFAULT NULL COMMENT '头像',
  `nickname` varchar(255) DEFAULT NULL COMMENT '昵称',
  `password` varchar(255) DEFAULT NULL COMMENT '密码',
  `sex` int(1) NOT NULL DEFAULT '1' COMMENT '性别,1=男;2=女',
  `phone` varchar(11) DEFAULT NULL COMMENT '手机号',
  `email` varchar(255) DEFAULT NULL COMMENT '邮箱',
  `wechat` varchar(255) DEFAULT NULL COMMENT '微信号',
  `qq` varchar(255) DEFAULT NULL COMMENT 'QQ号',
  `role_id` int(11) NOT NULL DEFAULT '0' COMMENT '角色id, 默认0',
  `last_login_time` datetime DEFAULT NULL COMMENT '最近一次登录时间',
  `status` int(1) NOT NULL DEFAULT '1' COMMENT '状态;0=停用;1=正常<默认>',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` VALUES (1, '2021-10-28 10:48:29', '2021-10-31 12:16:58', NULL, '15555649491', '', 'FuZhu_Me', 'e10adc3949ba59abbe56e057f20f883e', 1, '15555649491', '', '15555649491', '15555649491', 2, '2021-10-31 12:16:40', 1);
INSERT INTO `sys_user` VALUES (2, '2021-10-31 12:17:50', '2021-10-31 12:17:50', NULL, 'demo', '', '演示账号', 'e10adc3949ba59abbe56e057f20f883e', 1, '00000000000', '', '00000000000', '00000000000', 1, NULL, 1);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
